package suzuki;

import java.io.Serializable;

public class MSGJETON implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7551284558047095112L;
	private int[] J;
	private int nbrPlaceRestantes;
	
	public int getNbrPlaceRestantes() {
		return nbrPlaceRestantes;
	}

	public MSGJETON(int nbrPlaces, int allClientsSize){
		setJ(new int[allClientsSize]);
		for(int i = 0; i< getJ().length;i++){
			getJ()[i] = 0;
		}
		
		nbrPlaceRestantes = nbrPlaces;
	}
	//Tableau d'horloge dans le jeton
	
	public void decrementeNbrPlace(){
		nbrPlaceRestantes--;
	}
	public void incrementeNbrPlace(){
		nbrPlaceRestantes++;
	}

	public int[] getJ() {
		return J;
	}

	public void setJ(int[] j) {
		J = j;
	}
	
	
	@Override
	public String toString(){
		return "Jeton | Nombre de place restante : "+nbrPlaceRestantes;
	}
	

}
